<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: LineEditor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 Display Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classfabgl_1_1_line_editor.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classfabgl_1_1_line_editor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">LineEditor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classfabgl_1_1_line_editor.html" title="LineEditor is a single-line / multiple-rows editor which uses the Terminal object as input and output...">LineEditor</a> is a single-line / multiple-rows editor which uses the <a class="el" href="classfabgl_1_1_terminal.html" title="An ANSI-VT100 compatible display terminal. ">Terminal</a> object as input and output.  
 <a href="classfabgl_1_1_line_editor.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="terminal_8h_source.html">terminal.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a807070b39691e642214d64f2a31adb48"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a807070b39691e642214d64f2a31adb48.html#a807070b39691e642214d64f2a31adb48">LineEditor</a> (<a class="el" href="classfabgl_1_1_terminal.html">Terminal</a> *terminal)</td></tr>
<tr class="memdesc:a807070b39691e642214d64f2a31adb48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Object constructor.  <a href="classfabgl_1_1_line_editor_a807070b39691e642214d64f2a31adb48.html#a807070b39691e642214d64f2a31adb48">More...</a><br /></td></tr>
<tr class="separator:a807070b39691e642214d64f2a31adb48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f836284c31f1ead8cd6ba37a0ae9d5c"><td class="memItemLeft" align="right" valign="top">char const  *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a0f836284c31f1ead8cd6ba37a0ae9d5c.html#a0f836284c31f1ead8cd6ba37a0ae9d5c">edit</a> (int maxLength=0)</td></tr>
<tr class="memdesc:a0f836284c31f1ead8cd6ba37a0ae9d5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads user input and return the inserted line.  <a href="classfabgl_1_1_line_editor_a0f836284c31f1ead8cd6ba37a0ae9d5c.html#a0f836284c31f1ead8cd6ba37a0ae9d5c">More...</a><br /></td></tr>
<tr class="separator:a0f836284c31f1ead8cd6ba37a0ae9d5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89e762c939ca8263bbc3e7a03b828e40"><td class="memItemLeft" align="right" valign="top">char const  *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a89e762c939ca8263bbc3e7a03b828e40.html#a89e762c939ca8263bbc3e7a03b828e40">get</a> ()</td></tr>
<tr class="memdesc:a89e762c939ca8263bbc3e7a03b828e40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets current content.  <a href="classfabgl_1_1_line_editor_a89e762c939ca8263bbc3e7a03b828e40.html#a89e762c939ca8263bbc3e7a03b828e40">More...</a><br /></td></tr>
<tr class="separator:a89e762c939ca8263bbc3e7a03b828e40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6430a787852e87496fb5d9bb9a28fdd0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a6430a787852e87496fb5d9bb9a28fdd0.html#a6430a787852e87496fb5d9bb9a28fdd0">setInsertMode</a> (bool value)</td></tr>
<tr class="memdesc:a6430a787852e87496fb5d9bb9a28fdd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets insert mode state.  <a href="classfabgl_1_1_line_editor_a6430a787852e87496fb5d9bb9a28fdd0.html#a6430a787852e87496fb5d9bb9a28fdd0">More...</a><br /></td></tr>
<tr class="separator:a6430a787852e87496fb5d9bb9a28fdd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67a8e880ab23b518600d1b952421f73e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a67a8e880ab23b518600d1b952421f73e.html#a67a8e880ab23b518600d1b952421f73e">setText</a> (char const *text, bool moveCursor=true)</td></tr>
<tr class="memdesc:a67a8e880ab23b518600d1b952421f73e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets initial text.  <a href="classfabgl_1_1_line_editor_a67a8e880ab23b518600d1b952421f73e.html#a67a8e880ab23b518600d1b952421f73e">More...</a><br /></td></tr>
<tr class="separator:a67a8e880ab23b518600d1b952421f73e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a491e54a7fad0c9561bd9b029ba70638d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a491e54a7fad0c9561bd9b029ba70638d.html#a491e54a7fad0c9561bd9b029ba70638d">setText</a> (char const *text, int length, bool moveCursor=true)</td></tr>
<tr class="memdesc:a491e54a7fad0c9561bd9b029ba70638d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets initial text specifying length.  <a href="classfabgl_1_1_line_editor_a491e54a7fad0c9561bd9b029ba70638d.html#a491e54a7fad0c9561bd9b029ba70638d">More...</a><br /></td></tr>
<tr class="separator:a491e54a7fad0c9561bd9b029ba70638d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ecaac73a1a8cb3c755a4a8959cb42af"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a8ecaac73a1a8cb3c755a4a8959cb42af.html#a8ecaac73a1a8cb3c755a4a8959cb42af">typeText</a> (char const *text)</td></tr>
<tr class="memdesc:a8ecaac73a1a8cb3c755a4a8959cb42af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simulates user typing.  <a href="classfabgl_1_1_line_editor_a8ecaac73a1a8cb3c755a4a8959cb42af.html#a8ecaac73a1a8cb3c755a4a8959cb42af">More...</a><br /></td></tr>
<tr class="separator:a8ecaac73a1a8cb3c755a4a8959cb42af"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ae48b8189b6336ccfe6399aa63be84c27"><td class="memItemLeft" align="right" valign="top">Delegate&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_ae48b8189b6336ccfe6399aa63be84c27.html#ae48b8189b6336ccfe6399aa63be84c27">onCarriageReturn</a></td></tr>
<tr class="memdesc:ae48b8189b6336ccfe6399aa63be84c27"><td class="mdescLeft">&#160;</td><td class="mdescRight">A delegate called whenever carriage return has been pressed.  <a href="classfabgl_1_1_line_editor_ae48b8189b6336ccfe6399aa63be84c27.html#ae48b8189b6336ccfe6399aa63be84c27">More...</a><br /></td></tr>
<tr class="separator:ae48b8189b6336ccfe6399aa63be84c27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8435f456de0493338297189cd7b1c858"><td class="memItemLeft" align="right" valign="top">Delegate&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a8435f456de0493338297189cd7b1c858.html#a8435f456de0493338297189cd7b1c858">onChar</a></td></tr>
<tr class="memdesc:a8435f456de0493338297189cd7b1c858"><td class="mdescLeft">&#160;</td><td class="mdescRight">A delegate called whenever a character has been received.  <a href="classfabgl_1_1_line_editor_a8435f456de0493338297189cd7b1c858.html#a8435f456de0493338297189cd7b1c858">More...</a><br /></td></tr>
<tr class="separator:a8435f456de0493338297189cd7b1c858"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88829d27b7f7f4595bd5cf209c1ce4af"><td class="memItemLeft" align="right" valign="top">Delegate&lt; int * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a88829d27b7f7f4595bd5cf209c1ce4af.html#a88829d27b7f7f4595bd5cf209c1ce4af">onRead</a></td></tr>
<tr class="memdesc:a88829d27b7f7f4595bd5cf209c1ce4af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read character delegate.  <a href="classfabgl_1_1_line_editor_a88829d27b7f7f4595bd5cf209c1ce4af.html#a88829d27b7f7f4595bd5cf209c1ce4af">More...</a><br /></td></tr>
<tr class="separator:a88829d27b7f7f4595bd5cf209c1ce4af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dcca161f360237437de0ac2448f2621"><td class="memItemLeft" align="right" valign="top">Delegate&lt; <a class="el" href="group___enumerations_gab18ae5ee717bbc4b0722f7c3f5cffbf6.html#gab18ae5ee717bbc4b0722f7c3f5cffbf6">LineEditorSpecialChar</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a4dcca161f360237437de0ac2448f2621.html#a4dcca161f360237437de0ac2448f2621">onSpecialChar</a></td></tr>
<tr class="memdesc:a4dcca161f360237437de0ac2448f2621"><td class="mdescLeft">&#160;</td><td class="mdescRight">A delegate called whenever a special character has been pressed.  <a href="classfabgl_1_1_line_editor_a4dcca161f360237437de0ac2448f2621.html#a4dcca161f360237437de0ac2448f2621">More...</a><br /></td></tr>
<tr class="separator:a4dcca161f360237437de0ac2448f2621"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a974b7555d1aee55dee11cbdcb19e79ce"><td class="memItemLeft" align="right" valign="top">Delegate&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_line_editor_a974b7555d1aee55dee11cbdcb19e79ce.html#a974b7555d1aee55dee11cbdcb19e79ce">onWrite</a></td></tr>
<tr class="memdesc:a974b7555d1aee55dee11cbdcb19e79ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write character delegate.  <a href="classfabgl_1_1_line_editor_a974b7555d1aee55dee11cbdcb19e79ce.html#a974b7555d1aee55dee11cbdcb19e79ce">More...</a><br /></td></tr>
<tr class="separator:a974b7555d1aee55dee11cbdcb19e79ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classfabgl_1_1_line_editor.html" title="LineEditor is a single-line / multiple-rows editor which uses the Terminal object as input and output...">LineEditor</a> is a single-line / multiple-rows editor which uses the <a class="el" href="classfabgl_1_1_terminal.html" title="An ANSI-VT100 compatible display terminal. ">Terminal</a> object as input and output. </p>
<p>The editor supports following control keys:</p>
<ul>
<li><b>Left and Right Arrow keys</b>: Move cursor left and right, even across rows </li>
<li><b>CTRL + Left and Right Arrow keys</b>: Move cursor at the begining of prevous or next word </li>
<li><b>Home key</b>: Move cursor at the beginning of the line </li>
<li><b>End key</b>: Move cursor at the end of the line </li>
<li><b>Delete key</b>: Delete character at cursor </li>
<li><b>Insert key</b>: Enable/disable insert mode </li>
<li><b>Backspace key</b>: Delete character at left of the cursor </li>
<li><b>Enter/Return</b>: Move cursor at the beginning of the next line and exit editor</li>
</ul>
<p>Example: </p><pre class="fragment">Terminal.write("&gt; ");  // show prompt
LineEditor ed(&amp;Terminal);
char * txt = ed.get();
Terminal.printf("Your input is: %s\r\n", txt);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_s_s_d1306__o_l_e_d_2128x64_2_network_terminal_2_network_terminal_8ino-example.html#_a4">SSD1306_OLED/128x64/NetworkTerminal/NetworkTerminal.ino</a>, <a class="el" href="_s_s_d1306__o_l_e_d_2128x64_2_r_t_clock_2_r_t_clock_8ino-example.html#_a15">SSD1306_OLED/128x64/RTClock/RTClock.ino</a>, and <a class="el" href="_v_g_a_2_network_terminal_2_network_terminal_8ino-example.html#_a3">VGA/NetworkTerminal/NetworkTerminal.ino</a>.</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="terminal_8h_source.html#l02041">2041</a> of file <a class="el" href="terminal_8h_source.html">terminal.h</a>.</p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="terminal_8h_source.html">terminal.h</a></li>
<li><a class="el" href="terminal_8cpp_source.html">terminal.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>fabgl</b></li><li class="navelem"><a class="el" href="classfabgl_1_1_line_editor.html">LineEditor</a></li>
    <li class="footer">Generated on Mon Aug 2 2021 07:08:05 for FabGL by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
